
#pragma once

#include <string>
#include "Stl/STLvector.h"
#include "ImageLib.h"
#include "Renderer/OpenGL.h"
#include "GLresource.h"

class GLtexture:public GLresource
{
public:
	GLtexture();
	~GLtexture();
	bool LoadFile( const TCHAR* filename);

	int GetSlotIndex(){ 
		return m_slot;
	}

	virtual void Destroy();
	
	std::string m_file_path;
	GLuint m_id;
	int m_slot;

public:
	static int FindSlot();
	static void DeleteTexture( GLtexture* texture);
	static void ClearTextureList();
	static GLtexture* LoadTexture( const TCHAR* filename );
	static GLtexture* FindTexture( const TCHAR* filename );
	static STLvector<GLtexture*> m_texList;
};
